<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddColumnForAdminUser extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('admin_users', function(Blueprint $table) {
            $table->integer('working_age')->default(0);
            $table->string('id_card')->default('');
            $table->string('bank_card')->default('');
            $table->integer('status')->default(1);
            $table->integer('sex')->default(0);
            $table->integer('missing_date')->default(0);
            $table->tinyInteger('department_id')->default(0);
            $table->string('head_image')->default('');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table("admin_users", function(Blueprint $table){
            $table->dropColumn('working_age');
            $table->dropColumn('id_card');
            $table->dropColumn('bank_card');
            $table->dropColumn('status');
            $table->dropColumn('sex');
            $table->dropColumn('missing_date');
            $table->dropColumn('department_id');
            $table->dropColumn('head_image');
        });
    }
}
